/**
 *  @Package: com.yidu.drug.action
 *  @author: Administrator
 *  @date: 2018年8月31日 下午8:24:27
 */
package com.yidu.drug.action;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.yidu.drug.model.AuditModel;
import com.yidu.drug.service.AuditService;

/**
 * 类的描述 审核action层
 * @author 祝浪
 * @date 2018年8月31日
 */
@Controller
@RequestMapping("audit")
public class AuditAction {
	@Resource
	AuditService auditService;
	
	@RequestMapping("insertAuditPf")
	public String insertAudit(AuditModel audit,String pwId){
		audit.setQwId(pwId);
		int row=auditService.insert(audit);
		if(row>0){
			return "redirect:../pages/yq/financialAudit.html";
		}else if(row==-1){
			return "redirect:../pages/error.html";
		}else{
			return "redirect:../pages/yq/financialAudit.html";
		}
		
	}
	
	
	@RequestMapping("pfCaiWuAudit")
	public String pfCaiWuAudit(AuditModel audit,String pwId){
		audit.setQwId(pwId);
		int row=auditService.insert(audit);
		if(row>0){
			return "redirect:../pages/mln/pfCaiWuAudit.html";
		}else if(row==-1){
			return "redirect:../pages/error.html";
		}else{
			return "redirect:../pages/mln/pfCaiWuAudit.html";
		}
		
	}
}
